Platform Explorer / Nuxeo Platform 2021.61

Component org.nuxeo.ecm.core.orphanVersionsCleanup

Requirements

Resolution Order

135
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.core.orphanVersionsCleanup">

  <require>org.nuxeo.ecm.core.bulk</require>

  <!-- deprecated legacy orphan version cleaner
  <extension target="org.nuxeo.ecm.core.scheduler.SchedulerService" point="schedule">
    <schedule id="orphanVersionsCleanup">
      <cronExpression>0 30 1 * * ?</cronExpression>
      <event>orphanVersionsCleanup</event>
    </schedule>
  </extension>

  <extension target="org.nuxeo.ecm.core.event.EventServiceComponent" point="listener">
    <listener name="orphanVersionsCleanup" async="true" postCommit="true" enabled="false"
      class="org.nuxeo.ecm.core.versioning.OrphanVersionCleanupListener">
      <event>orphanVersionsCleanup</event>
    </listener>
  </extension>

  <extension target="org.nuxeo.runtime.ConfigurationService" point="configuration">
    <documentation>
      Configuration property for the maximum number of orphan versions to delete in one transaction.
      This is only meaningful if the OrphanVersionCleanupListener is active.
      @deprecated since 2023, the Bulk GarbageCollectOrphanVersionsAction is now the preferred way to clean up orphan
      versions.
    </documentation>
    <property name="org.nuxeo.orphanVersionsCleanup.commitSize">1000</property>
  </extension>
  -->

  <!-- bulk action implementing the new orphan versions full GC -->
  <extension target="org.nuxeo.ecm.core.bulk" point="actions">
    <action name="garbageCollectOrphanVersions" inputStream="bulk/garbageCollectOrphanVersions" bucketSize="100"
      batchSize="25" />
  </extension>

  <extension target="org.nuxeo.runtime.stream.service" point="streamProcessor">
    <streamProcessor name="garbageCollectOrphanVersions"
      class="org.nuxeo.ecm.core.action.GarbageCollectOrphanVersionsAction"
      defaultConcurrency="${nuxeo.bulk.action.garbageCollectOrphanVersions.defaultConcurrency:=2}"
      defaultPartitions="${nuxeo.bulk.action.garbageCollectOrphanVersions.defaultPartitions:=4}">
      <policy name="default" maxRetries="3" delay="500ms" maxDelay="10s" continueOnFailure="false" />
    </streamProcessor>
  </extension>

</component>